#!/usr/bin/env python
#-*- coding:gbk -*-
u'''
@file s2b.py
@brief this file is used for covert hex string like "aa bb cc" to bytes "\\xaa\\xbb\\xcc"
@author hulei
@version 1.0
@date 2013-05-14
@copyright Copyright(C) 2013 Hulei. All rights reserved.
'''

import sys
import hlutils

def help():
    print '''usage:
    s2b hexstr
    '''

def main():
    if len(sys.argv) == 1:
        help()
    else:
        print hlutils.str_to_bytes(''.join(sys.argv[1:]))

if __name__ == '__main__':
    main()
